package com.h2n.framework.dto;

import com.h2n.utils.EColor;

import java.util.Date;
import java.util.Map;
import java.util.Hashtable;

/**
 * Created by IntelliJ IDEA.
 * User: NhatNV
 * Date: Sep 11, 2009
 * Time: 11:01:30 PM
 * To change this template use File | Settings | File Templates.
 */
public class NewsDTO {

  private int news_Item;
  public int getNews_Item(){
    return news_Item;
  }
  public void setNews_Item(int _newsItem){
    news_Item = _newsItem;
  }

  private Date date_Begin;
  public Date getDate_Begin(){
    return date_Begin;
  }
  public void setDate_Begin(Date _dateBegin){
    date_Begin = _dateBegin;
  }

  private Date date_End;
  public Date getDate_End(){
    return date_End;
  }
  public void setDate_End(Date _dateEnd){
    date_End = _dateEnd;
  }

  private String title;
  public String getTitle(){
    return title;
  }
  public void setTitle(String _title){
    title = _title;
  }

  private String content;
  public String getContent(){
    return content;
  }
  public void setContent(String _content){
    content = _content;    
  }

  private String header_Color;
  public String getHeader_Color(){
    return header_Color;
  }
  public void setHeader_Color(String _color){
    header_Color = _color;
  }

  private String content_Color;
  public String getContent_Color(){
    return content_Color;
  }
  public void setContent_Color(String _color){
    content_Color = _color;
  }

  private int is_Locked;
  public int getIs_Locked(){
    return is_Locked;
  }
  public void setIs_Locked(int _isLocked){
    is_Locked = _isLocked;
  }

  public NewsDTO(){
  }

  public static final String TABLE_NAME = "p_tblNews";
  public static final String INSERT_NAME = "tblnews_insert";
  public static final String UPDATE_NAME = "tblnews_update";
  public static final String DELETE_NAME = "tblnews_delete";
  public static final String GET_INFO = "tblnews_getinfo";
  public static final String GET_ALL = "tblnews_getall";

  public Map getMap(){
    Map newsMap = new Hashtable();
    newsMap.put(TableNews.p_date_begin.toString(),this.date_Begin);
    newsMap.put(TableNews.p_date_end.toString(),this.date_End);
    newsMap.put(TableNews.p_title.toString(),this.title);
    newsMap.put(TableNews.p_content.toString(),this.content);
    newsMap.put(TableNews.p_header_color.toString(),this.header_Color);
    newsMap.put(TableNews.p_content_color.toString(),this.content_Color);
    newsMap.put(TableNews.p_is_locked.toString(),this.is_Locked);
    newsMap.put(TableNews.p_news_item.toString(),this.news_Item);
    return newsMap;
  }

  public enum TableNews{
    p_news_item,
    p_date_begin,
    p_date_end,
    p_title,
    p_content,
    p_header_color,
    p_content_color,
    p_is_locked;
  }
}
